<template>
  <config-provider :locale="zhCN">
    <form-design ref="form"/>
  </config-provider>
</template>

<script>
import {ConfigProvider} from 'ant-design-vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import moment from 'moment'
import 'moment/locale/zh-cn'
import form from './config/form'
/*import * as monaco from 'monaco-editor'*/

moment.locale('zh-cn');

export default {
  components: {ConfigProvider,},
  data() {
    return {
      zhCN: zhCN,
      value: 'demo'
    };
  },
  methods: {
    demo() {
      console.log(this.value)
    },
    submit() {
      this.$refs.form.validate();
    },
    reset() {
      this.$refs.form.resetFields();
    },
  },
  mounted() {
    /*monaco.editor.create(document.getElementById('container'), {
      value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
      language: 'javascript'
    });*/
  },
  created() {
  }
};
</script>
